package homework.day03;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class Test1 {
    private String name;
    private String pwd;
    private String nick;
    private int age;

    public static void main(String[] args) throws IOException {
        User u = new User("吴彦祖", "12138", "nick", 20) ;
        FileOutputStream fos = new FileOutputStream("吴彦祖.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(u);
        oos.close();
        }
    }

